#include "OurCornerKickBehaviour.h"

// Cas, ktory caka hrac s loptou pre nabiehanie si spoluhracov
#define WAIT_TIMEOUT 30

/*
 * Rohovy kop
 *
 * @param	nCornerKickModeDuration
 */
void OurCornerKickBehaviour::Behave()
{
	if(DATA_STORAGE.cornerKickModeDuration++ < WAIT_TIMEOUT)
	{	
		if((DATA_STORAGE.cornerKickModeDuration == 1) && (!world->me->IsLookingAt(Point(25, 0))))
		{
			world->me->bNeckSynchronization = false;
			GetTurnToBehaviour()->Behave(Point(25, 0));
			return;
		}	
		else
		{
			return;
		}
	}
			
	GetStartPlayOnByPassToOurPlayerBehaviour()->Behave();
}